<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <!--1. 导入中地的依赖 openlayer+中地的api -->
    <script src="./dist/include-openlayers-local.js"></script>
  </head>
  <body>
    <!-- 2.创建地图容器 -->
    <div id="map"></div>

    <script>
      /* 调用中地接口实例化地图文档 */
      const docLayer = new Zondy.Map.Doc("", "作业1-1", {
        ip: "localhost",
        port: 6163,
      })
      const map = new ol.Map({
        target: "map",
        //layers是图层
        layers: [docLayer],
        //view可以设置地图以什么样的方式进行展示
        view: new ol.View({
          //center设置中心点
          center: [114, 30],
          //zoom设置放大级别
          zoom: 5,
          //projection设置坐标
          projection: "EPSG:4326",
          /* EPSG:4326  3857 */
        }),
      })
    </script>
  </body>
</html>
